package router

import (
	"github.com/gin-gonic/gin"
	jwt "github.com/go-admin-team/go-admin-core/sdk/pkg/jwtauth"
	"tuowei.com/app/teacher/apis"
)

func init() {
	routerCheckRole = append(routerCheckRole, registerTeacherCheckRoleRouter)
	routerNoCheckRole = append(routerNoCheckRole, registerTeacherNoCheckRoleRouter)

}
func registerTeacherCheckRoleRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	v1.Use(authMiddleware.MiddlewareFunc())
}

func registerTeacherNoCheckRoleRouter(v1 *gin.RouterGroup) {
	login := apis.Login{}
	// 获取短信验证码
	v1.GET("/getMessageCode", login.GetMessageCode)
	// 短信登陆
	v1.POST("/login", login.Login)
	// 注销账号
	v1.POST("cancellation", login.Cancellation)
}
